
stuDict={"name":"zhangsan","score":88,"tel":"120","gender":"男","age":23}
stuList=[
{"name":"zhangsan","score":88,"tel":"120","gender":"男","age":12},
{"name":"lisi","score":88,"tel":"120","gender":"男","age":15},
{"name":"wangwu","score":88,"tel":"120","gender":"男","age":16},
{"name":"zhaoliu","score":88,"tel":"128","gender":"男","age":23},
{"name":"liuba","score":32,"tel":"188","gender":"男","age":23},
{"name":"zhouqi","score":45,"tel":"120","gender":"男","age":23}
]
#统计不及格的学生信息  拿到每个学生的成绩 判断是否大于60 小于60即为不及格
bujigeCount = 0
for stu in stuList:
    if stu["score"] <60:
        print("不及格人数%s,不及格的成绩%d"%(stu["name"],stu["score"]))
        bujigeCount+=1
print("不及格人数为%d"%bujigeCount)


#统计未成年人数
wcnCount= 0
for stu in stuList:
    if stu["age"] <18:
        print("未成年的姓名%s,未成年的年龄%d"%(stu["name"],stu["age"]))
        wcnCount+=1
print("未成年人数%d"%wcnCount)

#获取手机尾号为8的学生姓名
for stu in stuList:
    if stu["tel"].endswith("8"):
        print(stu["name"])
